home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Online
/
News
/
Thor
/
HD-Install
/
thor25_arexx.lha
/
SendCommand.thor
< prev
next >
Wrap
Text File
|
1994-04-21
|
2KB
|
71 lines
/* SendCommand.thor · by Petter Nilsen and Troels Walsted Hansen
** $VER: SendCommand.thor v1.0 (21.04.94)
**
** An ARexx script that will let you send a Script Command to several
** BBSes, based on a list or on interactive selection.
*/
options results
if(substr(address(),1,4) ~= "THOR") then do
parse arg portname
if~(show(p, portname)) then do
if ~(show(p, "THOR.01")) then do
say "No THOR port found!"
exit
end
else portname = "THOR.01"
end
end
else portname = address()
address(portname)
/* main stuff */
THORTOFRONT
REQUESTSTRING TITLE '"Please enter script command:"' BT '"_Ok|_Cancel"' MAXCHARS 50
command = result
REQUESTNOTIFY TEXT '"Do you wish to send command to BBSes from a list?"' BT '"_Yes|_No"'
if(result = 0) then do
do forever
REQUESTLIST BBSLIST
bbsname = result
if(rc ~= 0|bbsname = "") then break
ADDEVENT BBS '"'bbsname'"' EVENT DOCOMMAND CMD '"'command'"'
if(rc ~= 0) then REQUESTNOTIFY TEXT '"Failed to do command this time, try again?"' BT '"_Yes|_No"'
if(result = 0) then break
end
end
else if(result = 1) then do
REQUESTFILE TITLE '"Select Cross Command mailing list:"' ID '"THOR:Rexx/PostingLists"' FP
configfile = result
lastchar = right(configfile,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|configfile = "") then exit
open(cf, configfile, R)
do forever
call readln(cf)
bbsname = substr(readln(cf),6)
call readln(cf)
if(bbsname = "") then break
ADDEVENT BBS '"'bbsname'"' EVENT DOCOMMAND CMD '"'command'"'
if(rc ~= 0) then REQUESTNOTIFY TEXT '"Failed to do command this time, try again?"' BT '"_Yes|_No"'
if(result = 0) then break
end
close(cf)
end
exit